feat: add more export options for kepler map export - #3348
Conversation
1891d62 to
d2bd3ef
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds three new resolution export options (3x, 4x, 5x) to the kepler.gl map export feature. It also introduces a legend-scale remapping function so the legend doesn't scale as aggressively as the exported image when a high resolution is selected.
Changes:
- New
THREE_X,FOUR_X, andFIVE_Xentries added to theRESOLUTIONSenum, with correspondingImageResolutionOptionconstants and inclusion inEXPORT_IMG_RESOLUTION_OPTIONS - A new
calculateLogarithmicLegendScalefunction that linearly remaps the export scale to a reduced legend scale, injected via a CSS custom property - A CSS rule in
StyledPlotContainerthat applies the remapped scale to the.map-control-panelelement via thezoomproperty
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/constants/src/default-settings.ts |
Adds THREE_X, FOUR_X, FIVE_X to RESOLUTIONS enum and defines corresponding ImageResolutionOption objects, includes them in EXPORT_IMG_RESOLUTION_OPTIONS |
src/components/src/plot-container.tsx |
Adds legend scale remapping function and applies it via a CSS custom property to prevent the legend from scaling as aggressively as the exported image |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
fe9c7f2 to
f90eb09
Compare
|
@bdjulbic make sure we don't crash kepler.gl or our app.
|
Signed-off-by: bdjulbic <bdjulbic@foursquare.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: bdjulbic <bdjulbic@foursquare.com>
Signed-off-by: bdjulbic <bdjulbic@foursquare.com>
19e3a70 to
16aa6d2
Compare
Add multiple resolution export for the Kepler map export functionality
and add a scale factor to the tooltip panel applied during export